<template>


  <!-- 11.课时库存统计表.xls-->
  <el-drawer :title="text" :visible.sync="open_10" direction="rtl" size="25%" :show-close="false"
    :wrapperClosable="false"  @open="open">
    <el-row :gutter="20">
      <el-col :span="12">
        <div class="ml30">
          <div class="grid-content bg-purple-dark    text-size-23-w700  ">课时库存统计表.xls</div>
          <div class="grid-content bg-purple     text-size-16 mt20 text-gray  ">请设置报表下载范围</div>
        </div>
      </el-col>
      <el-col :span="12">
        <div class="classflex-end mt20 mr20">
          <el-button @click="cancel(10)" style="width: 100px; " class="">关闭</el-button>
        </div>
      </el-col>
    </el-row>
    <el-form class=" ml30 mr30" ref="form" :model="form" :rules="rules" label-width="80px" label-position="left">
      <el-divider style="width: 80%;"></el-divider>

      <el-form-item label="指定课程" prop="courseName">
        <el-select style="width: 360px;" v-model="form.courseName" placeholder="请选择课程" filterable>
          <el-option v-for="dict in courseList" :key="dict.id" :label="dict.courseName" :value="dict.courseName">
          </el-option>

        </el-select>
      </el-form-item>



      <el-divider></el-divider>
      <div>
        <el-button type="primary" @click="submitForm" style="width: 100%;">立即下载</el-button>
        <!-- <el-button @click="cancel">取 消</el-button> -->
      </div>
    </el-form>
  </el-drawer>


</template>

<script>
  import {
    listStudent,
    getStudent,
    delStudent,
    addStudent,
    updateStudent
  } from "@/api/student/student";
  import {
    listCourse,
    getCourse,
    delCourse,
    addCourse,
    updateCourse
  } from "@/api/course/course";

  export default {
    name: "DownCoursehourstatisticsDrawer",
    dicts: ['course_teaching_mode', 'course_state', 'course_subject', 'student_state', "order_state"],
    data() {
      return {
        text: "",
        open_10: false,
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        // 课程管理表格数据
        courseList: [],

        // 是否显示弹出层
        open_course: false,
        // 查询参数
        queryParamsStudent: {},
        // 弹出层标题
        title: "",
        // 表单参数
        form: {},
        // 表单校验
        rules: {


        },
        student_state: "",
        queryParamsCourse:{

        }

      };
    },
    created() {

    },
    watch: {


    },
    methods: {
      open(){
        this.getListCourse();

      },
      /** 查询课程管理列表 */
      getListCourse() {

        this.queryParamsCourse.deptId = this.$store.state.user.deptId;

        listCourse(this.queryParamsCourse).then(response => {
          this.courseList = response.rows;


        });
      },
      opendownCoursehourstatistics() {
        this.open_10 = true;
      },
      /** 学生列表导出按钮操作 */
      handleStudentExport() {
        // this.queryParamsStudent.deptId = this.$store.state.user.deptId;

        // this.download('student/student/export', {
        //   ...this.queryParamsStudent
        // }, `student_${new Date().getTime()}.xlsx`)
      },
      cancel(e) {
        console.log(e);
        switch (e) {
          case 0:
            this.open_0 = false;
            break;
          case 1:
            this.open_1 = false;
            break;
          case 2:
            this.open_2 = false;
            break;
          case 3:
            this.open_3 = false;
            break;
          case 4:
            this.open_4 = false;
            break;
          case 5:
            this.open_5 = false;
            break;
          case 6:
            this.open_6 = false;
            break;
          case 7:
            this.open_7 = false;
            break;
          case 8:
            this.open_8 = false;
            break;
          case 9:
            this.open_9 = false;
            break;
          case 10:
            this.open_10 = false;
            break;
          case 11:
            this.open_11 = false;
            break;
          default:

        }

      },
    },
  }
</script>
<style scoped lang="scss">
  .home {
    blockquote {
      padding: 10px 20px;
      margin: 0 0 20px;
      font-size: 17.5px;
      border-left: 5px solid #eee;
    }

    hr {
      margin-top: 20px;
      margin-bottom: 20px;
      border: 0;
      border-top: 1px solid #eee;
    }

    .col-item {
      margin-bottom: 20px;
    }

    ul {
      padding: 0;
      margin: 0;
    }

    font-family: "open sans",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
    font-size: 13px;
    color: #676a6c;
    overflow-x: hidden;

    ul {
      list-style-type: none;
    }

    h4 {
      margin-top: 0px;
    }

    h2 {
      margin-top: 10px;
      font-size: 26px;
      font-weight: 100;
    }

    p {
      margin-top: 10px;

      b {
        font-weight: 700;
      }
    }

    .update-log {
      ol {
        display: block;
        list-style-type: decimal;
        margin-block-start: 1em;
        margin-block-end: 1em;
        margin-inline-start: 0;
        margin-inline-end: 0;
        padding-inline-start: 40px;
      }
    }
  }
</style>
